Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed chart crashing bug on enabling multiple shapes with multiple legends selected #33221

Open
wants to merge 122 commits into
base: master
Choose a base branch
from

Conversation

srmukher
Copy link
Contributor

@srmukher srmukher commented Nov 7, 2024

AtishayMsft and others added 30 commits May 6, 2024 10:37
@srmukher srmukher requested a review from a team as a code owner November 7, 2024 12:00
@AtishayMsft AtishayMsft requested review from AtishayMsft and removed request for a team November 11, 2024 07:46
@@ -184,7 +184,6 @@ export const LineChart: React.FunctionComponent<LineChartProps> = React.forwardR
}, [props.height, props.width, props.data]);

function _injectIndexPropertyInLineChartData(lineChartData?: LineChartPoints[]): LineChartDataWithIndex[] | [] {
const { allowMultipleShapesForPoints = false } = props;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this change? Not using enable multiple shape prop anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allowMultipleShapesForPoints is used as it is in _createLegends,_getBoxWidthOfShape,_getPath,_getPointFill functions. Within _injectIndexPropertyInLineChartData function, the index of the selection was earlier passed based on allowMultipleShapesForPoints prop. If allowMultipleShapesForPoints was true, index was passed as -1 which was causing the crash at _createLines function where it was getting index of point as -1.

Base automatically changed from usr/atisjai/chartsV9 to master November 14, 2024 02:55
@AtishayMsft AtishayMsft requested review from a team as code owners November 14, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants